#ifndef WAVE_H
#define	WAVE_H

#include "RainbowException.h"

class Wave {
public:
    Wave(Dot set_source, double set_tangent, unsigned set_length) : source(set_source), tangent(set_tangent), length(set_length), hasEnding(false) {};
    Dot getSource() { return source; }
    double getTangent() { return tangent; }
    short getLength() { return length; }
    void setEnding(Dot set_ending) { ending = set_ending; hasEnding = true; }
    bool getHasEnding() { return hasEnding; };
    Dot getEnding() { if (!hasEnding) { throw RainbowException(); } else { return ending; } }
private:
    Dot source;
    Dot ending;
    bool hasEnding;
    double tangent;
    unsigned length;
};

#endif	/* WAVE_H */

